SMIP PnP driver revision history:
--------------------------------

Date:			1/12/2022
Version Number:		4.54.00
Model Number: 		SMIP products
Operating System:	Windows

	New Feature:		
		1.) Fixed max relay count for SMP3005.
---------------------------------------------------------------------------------------------------------------------------------------	
Date:			8/10/2021
Version Number:		4.53.00
Model Number: 		SMIP products
Operating System:	Windows

	New Feature:		
		1.) Fixed relay identifier type detection issue for SM700x modules.
---------------------------------------------------------------------------------------------------------------------------------------	
Date:			1/6/2021
Version Number:		4.52.00
Model Number: 		SMIP products
Operating System:	Windows

	New Feature:		
		1.) Added support for SM6306 module
---------------------------------------------------------------------------------------------------------------------------------------	
Date:			10/1/2019
Version Number:		4.51.00
Model Number: 		SMIP products
Operating System:	Windows

	New Feature:		
		1.) Added support for SST29VF1601C flash
---------------------------------------------------------------------------------------------------------------------------------------		
Date:			5/15/2017
Version Number:		4.50.01
Model Number: 		SMIP products
Operating System:	Windows

	New Feature:		
		1.) Fixed the execute call to close all relays in SMP1200-S-11454 module
		2.) Changed visual display of few relays to SPDT in the SMP1200-S-11454 module
---------------------------------------------------------------------------------------------------------------------------------------		
Date:			5/1/2017
Version Number:		4.50.00
Model Number: 		SMIP products
Operating System:	Windows

	New Feature:		
		1.) Added SMP1200-S-11454 complete new UI feature to support BATS modules
		2.) Included vertical switch images for customized look
		3.) Incorporated UI window control support and specific callback function such as openall, close & execute for menu operation
		4.) Added scroll bars to the main SFP window to support large SFPs in low resolution screens
---------------------------------------------------------------------------------------------------------------------------------------		
Date:			2/20/2017
Version Number:		4.44.09
Model Number: 		SMIP products
Operating System:	Windows

	New Feature:		
		Added vtvmSmip_disableOdometers() and vtvmSmip_getDisableOdometersStatus() to allow
		turning off the odometers feature
---------------------------------------------------------------------------------------------------------------------------------------	
Date:			1/31/2017
Version Number:		4.44.08
Model Number: 		SMIP products
Operating System:	Windows

	New Feature:		
		Updated the New Model Switch Card SFP to support the current maximum number of relays   
---------------------------------------------------------------------------------------------------------------------------------------	
Date:			5/16/2016
Version Number:		4.44.07
Model Number: 		SMIP products
Operating System:	Windows

	New Feature:		
		Removed vtvmSmip_incrementOdometers and added vtvmSmip_updateOdometers 
---------------------------------------------------------------------------------------------------------------------------------------	
4.44.06 2016.0512 JSK
   1.) Added vtvmSmip_incrementOdometers for manual incrementation of odometer values 
   2.) Added vtvmSmip_pushOdometerstoFlash for writing the odometer values to the flash memory
       manually
4.44.05 2015.0827 RK
   1.) File recompiled for x64 build
	  2.) x64 compitability flags added
4.44.04 2015.0208 JSK 
   1.) Added support for SMP1200-S-11454
   2.) Max # of relays has been increased to 400 from 160
   3.) NV memory has been increased to 158 from 128
   4.) time_t type used in odometer has been changed to ViUInt32 so that MS Visual Studio 
       does not use a type other than 32-bit unsigned integer
4.43.02 2012.0113 MDU
   1.) Corrected the serialNvReset() function.
   2.) Fixed a problem with the odometer count for the first relay closed before the odometer
     area in flash was initialized. 
   3.) In order to display the correct revision in the "Add/Remove Programs - Support Info",
     if the distribution is built in LabWindows CVI 9, the "Installer Version" field on the
     "General" tab of the "Edit Installer" form must be the same as the driver version.
   4.) Corrected the channel number labels on the SMP7000-S-11354 SFP.
4.42.07 2011.1201 MDU
   1.) Added support for the new serial eeproms with device address = 3.
   2.) Mods to make the SMP7000-S-11346 work.
   3.) Corrected a problem in vtUpdRegs(), it was not handling inverted readback correctly.
   4.) Corrected a problem with SMP5002 (Rev C, possibly others). The serial eeprom was not
         working correctly, added a serial reset before access to ensure the eeprom was in
         the correct state.
   5.) Corrected wipeFlash(), it was not allowing sufficient time for the erase function to
         complete. Worst case sector erase time for the supported parts is 8 seconds.
   6.) Corrected the operation of _SetUserNonVol() for switch modules with flash.
   7.) Restored sfp_smip.c, sfp_smip.h and sfp_smip.uir to 'stock' versions.
4.41.05 2010.1213 MDU
   1.) Removed el.c and vtvmSmip.c from the SFP project and set vtvmSmip_32.lib back to
         'Include file in build' so the project uses the library as it is supposed to.
   2.) Merged the two source control repositories and locked the 'legacy' repository so that
         everyone uses the same repository.
   3.) Updated vtvmSmip.bas, added SM6105, SMP7000BB, SMP7000-S-11346 & 'uninitialized'.
   4.) In el.c function getELConflict(): initialized variable 'el_t *pEL' where it's declared
         rather than in a separate line to resolve FogBugz case 3524.
   5.) Provided further documentation of changes made in rev 4.40. In sfp_mods.c, if the optical
         carrier was an SM8001 or SM8002, function LoadTheSwitchPanel() previously loaded panel 
         PNL_PSM_SW (prism switches) despite the fact that the prism switches would make the 
         product an SM8003. This required a change to the calculation of the panel index in 
         function Opt_controlClick().
4.40.01 2010.1109 SGR
   1.) SM8000's were not being managed properly in the SFP.  No changes were needed in the 
   driver itself, but the section in the SFP that determined which set of switches were to be 
   actuated was broken by a previous edit to allow for a different switch.  This broken section 
   is now bypassed when the switch is an SM8000, unless it's a prism or attenuator.
   2.) The previous update did not change the model constant in the BAS file, this was changed 
   in this version so that the two model codes match.

 4.39.01 2010.1011 MDU  
   1.)   Made the 4064 a 4064 instead of an 11372. 
            Left the 11372 in place for backward compatibility.
 4.38.02 2010.0804 MDU
   1.) Removed support for the SM7000-S-11201-1 due to revision lock.
   2.) Added support for new serial EEPROMs that require device address.
   3.) Reading the eeprom of an uninitialized switch module would cause a fatal array access 
         error in _getOdometers(). Added a range check for the size of the odometer array passed.
   4.) Corrected an error that prevented _getFlashID() from recognizing flash.
 4.37.04 2010.0727 MDU  Added support for the SM7000-S-11201-1.
 4.36.00 2009-08-27 BPF
   1.) Fix to Open/CloseRelay to fix non-latching version of 7016
   2.) Fix to SFP for SFP panel of non-latching 7016 
 4.35.00 2009-08-27 BPF
   1.) Change Model number for SMP4064-S-11372 to "4064" instead of "11372" to match customer 
         expectation
 4.34.00 2009-08-06 BPF
   1.) Correct a bug in the installer causing it to claim a higher version was installed when 
         this was incorrect.
 4.33.00 2009-07-31 BPF
   1.) Added support for the SMP4064-S-11372 in driver and SFP
   2.) Fixed support for the SMP6101-S-11362 in the driver
   3.) Corrected a minor channel name issue on the 6101-S-11362 SFP
 4.29.01 2008-04-04 MDU
     1.) Added support for the SMP6104.
     2.) Added support for the SMP2007A.
     3.) Corrected the relay handling for K35 - K44 for the SMP7600 Programmable Load.
 4.28.06 2008-03-20 MDU
     5.) Updated vtvmSmip.bas Merged Rev 4.14 and Rev 4.28. Multiple definitions got deleted
                 somewhere along the way.
     6.) Added the Odometer and Exclude List (EL) export functions to vtvmSmip.bas. Also added 
                 instruction in vtvmSmip.h for using CVI to generate vtvmSmip.bas. 
     7.) Updated vtvmSmip.bas, missed the instruction about replacing the 'auto-generated' 
                 declarations for vtvmSmip_DownloadNonvol() and vtvmSmip_ReadNonvol().
 4.28.04 2008-03-20 GS
     1.) Added support for a special 4005 flavor - based on a procedure recommended by MU.
 4.28.03 2008-02-25 SGR (.03 - 2008.0310 MU)
     1.) Added SMP7000 capability, including the SMP7000-S-11346.  This involved the definition 
             of some new parameters (model code vtvmSmip_P7000 (17000), model code 
             vtvmSmip_SMP7000_11346 (121346),  vtvmSmip_PORT_OUTPUT (1), vtvmSmip_PORT_INPUT (0),
             vtvmSmip_PORT_ENABLED (0) and vtvmSmip_PORT_DISABLED (1).
             Also added new error code and message for vtvmSmip_ERROR_PORT_ENABLED.
     2.) Modified _init so that when the SMP700-S-11346 model is init'd the lack of registers does not cause an binit failure.
     This module will not have any register communication capability, and needs to be handled acordingly.
     3.) In vtvmSmip_DownloadNonvol(), added a call to ReducedNonvolQuery() if the call to progFlash() is
         successful. This prevents vtvmSmip_resetOdometers() from attempting to reset 0xFFFF odometer
         registers. vtvmSmip_resetOdometers() uses the number of relays from the SmipInfo structure to
         determine how many odometer registers to reset.
     
 4.27.06 2007-12-10 SGR
     1.) SFP sub-panel for SM7106 is coming up in an invalid state.  Added a case statement in sfp_mods.c LoadTheSwitchPanel
         function to have the SFP update the switches in the same manner as the SM7000-S_11197.
     2.) Added a case statement in GetRelayGroup to query offsets 6 and 8 if the model is an SM7016.
     3.) Changed sfp_mods.c mwSpdtClick function.  The SM7016 and SM7016 were handled in the same manner, but these two
         models operate differently.  The SM7000-S-11197 was handled different from the SM7016's, but it is the same as the SM7016L.
         The function was changed to handle the SM7016L and 11197 the same, but left the SM7016 (non-latching) operations as-is.
         Also, a call to initPnl11197 was added to update the SM7016 and/or 11197 panel after any relay is actuated.
     4.) Corrected the vtSet11197 function.  It was not handling relays in the two optional 1x6 modules.
     5.) Changed sfp_mtrx.c setLmwmPath function.  It was handling SM7016 and SM7016L the same, but these two models operate
         differently.  The function was changed to handle the SM7016L and the vtvmSmip_SM11197, but left the SM7016 (non-latching)
         operations as-is.
     6.) Added an error code to report Model/Function incompatibility.  With the way the SFP was prior to this modification, the
         vtvmSmip_OpenRelay function was being called for the SM7016L, which would result in multiple contacts being made rather
         than the one specified being opened.  As this could have disasterous consequences in some applications, an error was added
         to report that this function is not compatible with the SM7016L or the 11197.  This way, if a user tries to call this
         function they will not get the fault condition.
 4.26.04 2007-11-29 SGR
     1.) Corrected a bug with the global Resource Manager handle counter decrement.
     2.) Added a definition for the SMP6101-S-11362
     3.) Added the SMP6101-S-11362 model constant to the MCAM disallowed list.
     4.) Added implementation of the SMP6101-S-11362 to the SFP application.
 4.25.01 2007-09-27 SGR
     1.) There was a bug introduced at Rev 4.21 that results in self_test failing because it is improperly reporting the populated
         status of all plug-in boards.  This fault was due to the way the new vtvmSmip_getFlashID() function works.
         The vtvmSmip_getFlashID() function was being used to load the populated status of the struct array that is local to the driver.
         Because it did not update the struct passed into it (except when the struct passed in was one element of the local struct array)
         The struct passed in would have the populated parameters left as unpolulated, regardless of the actual status of the instrument.
         This modification changes the way the vtvmSmip_getFlashID() function works, updating the populated status of the struct passed
         into the vtvmSmip_QuerySmip function.  The update allows the struct passed into the vtvmSmip_QuerySmip function to be the only
         struct modified when passed into the function.
 4.24.01 2007-05-16 GS
     1)  It was possible to get a bus timeout by writing to consecutive [relay control] registers
         over a GPIB slot 0. The underlying reason was traced to FPGA operation and timing. RF
         switches were the only ones (for now) affected. Added logic to dynamically adjust their
         delay [= debounce timing] so GPIB's slow transfer speed would not cause bus timeouts.
 4.22.01 2007.0406 KCA
     1.) Re-Introduced the ability to get extended card information when using GPIB.  This was prevented in earlier versions to
         improve performance.  Recent changes in the driver to improve GPIB performance now allows us to re-introduce this.
 4.21.13 2007.0116 SGR (Changes)/KCA (Verification)
     1.) Changes made to vtvmSmip_init() so that instead of using the getFlashIdent() function to check if odometers are present
         it uses the already established data structure.  Also, it will not touch odometers if a GPIB interface is used.  Weighing
         the trade off between having the odometer feature versus having software that performs at appropriate speeds, it seems
         more logical to sacrifice the odometer feature in order to have a driver that functions efficiently.  The function was also
         modified to not restore SM7500 control registers at the end.  This is valid since the driver is updated so that the control
         registers can never be un-neccessarily modified.
     2.) getFlashIdent() removed from driver completely, and replaced with the new getFlashID().
     3.) vtvmSmip_getFlashID() function was added.  This function does several things:  It determines whether each slot is populated,
         what kind of memory exists on the board at each location, if flash memory, what kind of flash, and it updates the traceRam
         global variable which is used in multiple locations in the driver.  The function takes this data, and populates a data structure
         which is used elsewhere in the driver to greatly reduce backplane traffic.  This improves the users experience while using a
         GPIB interface.  As opposed to previous versions, this function is careful to check for the presence of serial memory first.
         This prevents the previous problems of the instrument driver stomping on the uniqe control registers of the SM7500 that occurs
         while the driver checks/queries flash type memory.  This validates the removal of all the SM7500 save/restore measures
         previously in the driver.
     4.) Changes made to reducedNonVolQuery() so that it no longer modifies, nor returns the global race ram variable that exists in
         the driver.  This is all handled in the new getFlashID() function.
     5.) Changes made to the rstTrcRamCtrl() function so that this function is no longer calling the reducedNonVolQuery() function.
         This is no longer necessary as the reducedNonVolQuery() function no longer returns the contents of the trace ram register.
     6.) Changes made to vtvmSmip_DownloadNonvol(), vtvmSmip_ReadNonvol(), and vtvmSmip_Read_A_NonvolByte() so that what type of
         memory the specific card has is determined by checking the given session's data structure rather than by actually querying
         the memory.  Intent is to reduce backplane traffic and increase performance with GPIB interfaces.
     7.) changes made to vtvmSmip_QuerySmip() so that it makes use of the new vtvmSmip_getFlashID() in order to establish which cards
         are installed in which locations on the carrier.
     8.) Changes made to vtvmSmip_GetExtendedInfo() function so that the SMP7500 control/data registers are not restored.  This is
         is no longer necessary since the driver is updated so that the control/data registers can never be un-necessarily modified.
     9.) Changes made to vtvmSmip_Close() so that the odometer update is skipped if GPIB interface is being used.  See change 1 for
         justification.
    10.) Changes made to vtvmSmip_readFlash() so that the possition in which the BBM/MMB mode was disabled/enabled was changed.
         This was done to prevent un-neccessary multiple register reads/writes, and to improve efficiency.
    11.) Changes made to vtvmSmip_lockControl() so that the enabling/disabling of BBM/MMB mode was added surrounding setAddrCtrl().
         Done to allow for improvements in efficiency in other areas of the driver.
    12.) Changes made to vtvmSmip_setAddrCtrl() so that the enabling/disabling of BBM/MBB is completely removed from within this
         function.  This was done because there is instances in the driver where this function is called repeatedly.  The enabling
         disabling of BBM/MBB should only be done once in these situations.  Notes added to function definitin to warn future
         developers that BBM/MBB should be disabled/enabled before and after using the functions.
    13.) Reimplemented vtvmSmip_scanSsioCard().  The original function was not operating as it is defined by the function panel.
 4.20.01 2006.1031
     1.) Added definition of SM7016 non-latching module - GS
 4.19.01 2006.0921
     1.) Added correct loading of the 7500 relay delays from the module.
 4.18.02 2006.0918
     1.) Moved the SM7500 control registers' save area to the individual cards. One global buffer could cause
         an SMOD's registers to be confused for another's.
 4.18.01 2006.0918
     1.) Fixed the restoration of the port control register in case an error is discovered.
 4.17.01 2006.0802
     1.) Fixed the driver code supporting the SM7001A-S-11106.
     2.) Modified the driver code supporting the SM7001A-S-11106 to prevent the driver from
             energizing two SPDT coils (on the same relay) at the same time.
 4.16.01 July 10, 2006 GS
     1)  Added support for the new SM7500 to allow readback of external I/O state instead of just
         the internal commanded state.
     2)  Clearing the trace RAM on each SMOD reset was an overkill. Moved that part to the SMIP
         'reset' logic within the 'init' API and made it a one-time operation instead of repeated.
         Clearing the trace RAM is never actually needed. It is only there so an existing, buggy user application
         will not break.
 4.15.01 July 6, 2006 GS
     1)  The Flash versus serial EEPROM detection in getFlashIdent was not reliable. Added a test
         to detect correctly.
 4.14.02 2006.0628   MU
     1.) Added SFP support for the SM8202 dual optical attenuator.
     2.) Replaced hard coded model numbers with constants in FetchOpticalInfo() and added the
                 SM8202 to the function.
 4.13.01 June 27, 2006   Gershon Shamay
     1)  Added definitions for the new 8202 switch card.
 4.12.01 June 15, 2006   Gershon Shamay
     1)  Added one more check in getFlashIdent, to avoid touching flash control registers
         if the module has a serial EEPROM (i.e. does not have flash). The SM7500 port
         control registers overlap the flash control ones.
     2)  Replaced a few direct A32_SPACE references with the A32/A24 indicator from the SmipInfo structure.
 4.11.01 May 10, 2006    Gershon Shamay
     1)  Added missing constants for Visual Basic
     2)  Enabled all odometer functions to be used by manufacturing.
     3)  Replaced an indirect VISA sleep mechanism with a standard one.
 4.10.01 April 26, 2006  Gershon Shamay
     1)  Changed the "wait for not busy" logic to make it immune from host load creating a false
         timeout indication.
     2)  Added more bullet proofing code for SM7500 registers saving, restoring, etc.
 4.09.01 Mar 30, 2006    Gershon Shamay
     1)  The SMP7500 card also differs from others in its control registers map. The standard Flash control
         locations at 0x200, 0x206, etc are taken up by special module specific registers. This causes it
         to misbehave if initialized twice without a reset in between.
 4.08.01 Mar 27, 2006    Gershon Shamay
     1)  Corrected the SM7500 register limiting logic. It was calculating 0 registers to read instead of 1.
 4.07.01 Mar 1, 2006     Gershon Shamay
     1)  SM7500 creates bus errors when the driver reads beyond the first 12 registers [odometers
         logic]. Changed part of _init to compensate.
 4.06.01 Jan 30, 2006    Gershon Shamay
     1)  Added the option to reset just one odometer. Mnufacturing can use this when replacing one
         relay.
 4.05.01 Jan 2006 Gershon Shamay
     1)  Added a "wait for card ready" before Flash accesses. This is needed so that previous
         cards work correctly when odometers are enabled.
     2)  Flash access didn't work correctly when the switch card was in MBB or BBM mode. Added
         a save and restore of the current mode in the functions that access the flash.
 4.04.01 2006.0104 MU
     1.) Added support for the SM8001 and SM8002 to vtvmSmip_reset().
 4.00.02 Nov 2005    Gershon Shamay
     1)  Added logic to implement relay odometers [count open/close cycles for each].
         Odometers are saved periodically to the modules' Flash. Only supported for modules
         which have Flash.
     2)  Added support for SM7001L-11317
 4.00.01 Oct 2005    Gershon Shamay
     1)  Added Exclude Lists functionality. See the user manual for details. The relevant code
         sections are enclosed in "#ifdef EL" to allow for complete backwards compatibility.
     2)  Changed the last parameter's name in function vtSet12393 from rlyNmbr to channelID,
         to better reflect what it truly is.
     3)  Changed the equivalent parameter name in function vtClr12393.
     4)  vtvmSmip_openMatrixPath : added support for SMP2300-93C. Removed references
         to the lut2300 translation table, which was creating wrong relay masks.
     5)  Added the corresponding fix to vtvmSmip_closeMatrixPath. Added support for SMP-2300-93C to the
         same function.
     6)  Removed unneeded 'if' test from vtvmSmip_SetRelayGroup.
     7)  Changed the vtvmSmip_SetupScan3001 parameter list. Added a missing parameter (size of the
         smNumList[] array) and corrected the logic accordingly.
     8)  Removed leftover "#if 0" sections of code.
     9)  vtvmSmip_error_message : corrected a test from < to <=  (the very last error code message
         was never returned).
     10) vtvmSmip_error_message : added support for exclude list warnings and error messages.
     11) vtChkFunc : added a missing test for smodNmbr > 5.
     12) Used a formatting tool to give the entire source a more uniform appearance and improve
         visibility of "if" statements, control loops, etc.
 3.56.0
     1.) Fixed _qryLoadStatus(), '==' in an assignment.
     2.) Fixed _SetupScan3001(), there was a signed - unsigned comparison.
     3.) Made the prototype for vtGetXmem() conditional on DO_MAPPING, as the definition is.
     4.) Fixed a memory leak caused by _init(). Each time _init() was called, a new resource
                 manager session was opened. These sessions were never closed. The resource manager
                 session is now static. Also, the driver now counts the number of open SMIP handles.
                 When all SMIP sessions are closed, the resource manager is closed and nulled, so a
                 call to _init() will need to open a new session.
 3.55.04 2005.0308sgr
     1.) Fixed the incorrect parameter validation in vtvmSmip_SetOpenBus.
     2.) Fixed corresponding Help documentation for the vtvmSmip_SetOpenBus function.
     3.) Modified the organization of the FP so that functions are logically grouped.
     4.) Added Error Checking and reporting to the Openbus function calls from the SFP.
 3.54.01 2005.0301mu
     1.) Fixed the 'Open All' function for the SM2300-93C panel.
     2.) Added flash support to functions _DownloadNonvol() and _ReadNonvol()
     3.) Added support for the SMP3005
 3.53.01 2004.1207mu
     1.) Added support for the Atmel and ST Micro Flash Parts
 3.52.02 2004.1202mu
     1.) Added support for the SMP2300-93C
     2.) Added support for the SMP7600A
 3.50.01 2004.1008mu
     1.) Added SMP6006
 3.49.01 2004.0826mu
     1.) Added 6101-IS and 6102-IS.
 3.48.01 2004.0729mu
     1.) Modified initJButtons() and initSwTbox() to fix a problem in the SFP where 'phantom'
                 SMODs would appear when using the INIT button to switch from one SMIP to another.
 3.47.03 2004.0615mu
     1.) Added support for the SMP2012 and SMP2300
     2.) Added support for the SMP4028 and SMP4044
     3.) Added support for the SMP2300-93 (internal model number 2393)
 3.46.02 2004.0504mu
     1.) Removed the read from the delay register in wt4Settled()
     2.) Fixed a problem in vtGetScanInfo(), wasn't handling module 0.
 3.45.01 2004.0402sgr
     1.) Modified _reset to clear Trace RAM correctly
     2.) Moved the VTI.ICO file.  It was previously located in a location where it would not get
             installed, causing the sfp to fail to work from the project.
 3.44.01 2004.0311mu
     1.) Modified vtGetScanInfo() per ECR 0727
 3.43.03 2004.0308mu
     1.) Modified EEPROM interface functions to use ViUInt8 internally.  This will fix the
             problem with seemingly corrupted data that cropped up at Rev 3.41 as a result of
             converting ViUInt8s to ViChars for VEE compatibility.
     2.) Added the SMP3002 Multiplexer
     3.) Added the SMP4028 Matrix
 3.42.00 2003.1223sr Modified _OpenRelay() and _CloseRelay() so ctrlOffs is index, not offset!
 3.41.05 2003.0929mu
     1.) Corrected a problem in the SFP for the SMP7600, was leaving 'Setup' and 'Open All'
             menu bar items enabled. These menu items do not apply to the SMP7600.
     2.) Mods to vtvmSmip.H for Agilent VEE compatibility:
                 changed error code definitions from enum to #defines
     3.) Mods to vtvmSmip.fp for Agilent VEE compatibility:
                 removed ViConstString data type, was not being used
                 changed ViUInt8[] data type to ViChar[]
     4.) Mods to vtvmSmip.c for Agilent VEE compatibility:
                 modified _SetUserNonVol() and _QueryUserNonVol() to use ViChar[] not ViUInt8[]
                 (required changing MyNonvolWrite() and MyNonvolQuery() as well)
     5/) Removed some leftover debug code.
 3.40.02 2003.0923mu
     1.) ECR-0549:   Modified vtWt4BsyBar() to count milliseconds instead of clock ticks.
     2.) ECR-0554:   Fixed lookup table in SFP for 6203. Relays 28, 29 & 30 had been omitted.
 3.39.02 2003.0729mu
     1.) Fixed SFP for 5004 and 5005, they were using the panel for the 5003! Thanks BH!
     2.) Cosmetic changes: changed the size of some of the switch module panels so that all
             of the menu selections were visible.
 3.38.05 2003.0514mu
     1.) Routed almost all A24/A32 space access through new function vtUpdRegs(). The default
             access method is now through calls to viIn16() and viOut16(). All references to
             viMapAddress() were removed per customer request. All mapping now handled by VISA.
             (NOT YET IMPLEMENTED:   A version of vtUpdRegs() can be built to use viMapAddress() )
     2.) Replaced vtvmSmip_NvDelay() with nvolWait() which provides a simpler delay scheme.
     3.) Added Multiple Coil Actuation Mode (MCAM) per customer request. See the function panel,
             the help file or function vtvmSmip_setMcamEnable() for detailed info on how to enable
             and operate in MCAM.
     4.) Added code to select inverted readback if the bit is set in non-vol. Added a confirm
             popup in the SFP to notify the user that if the inverted readback enable is not set
             correctly, closing or opening one relay will result in closing or opening all of the
             relays that are controlled by the same register.
     5.) Fixed _OpenRelay() and _CloseRelay(), they were handling the SMP6301 incorrectly.
 3.37.05 2003.0424mu
     1.) Implemented support for the VT7004-S-11255 model code (291d/0x0123). (ECR 0427)
     2.) Added code to support setting the open bus trigger polarity. (ECR 0277)
                 Changed local constant OB_TRIG_POL_REG to OB_TRIG_SEL_REG as it was mis-named.
     3.) Modified the 'FP_Polarity' parameter check in _SetOpenBus() to conform to the
                 help documentation. (ECR 0278)
     4.) Fixed the ctrlData parameter check in _setPortInpSynch(). (ECR 0279)
     5.) In sfp_smip.c, added code to initSwTbox() to display the serial number. (ECR 0421)
 3.36.02 2003.0310mu
     1.) Added a separate panel for the SMP6203. Modified SFP to support the actual bit map.
     2.) Added support for the SM7000-S-11247
 3.35.03 2003.0216mu
     1.) Modified the non-vol download function to support the Atmel 24C01
     2.) Modified support for the SMP6000-S-11227 to support the 'joining relays'.
     3.) Fixed a problem in _GetOpticalType() where it was nulling a pointer.
     4.) Fixed a problem with the Optical Modules, MUST look up the number of relays from
             non-vol, as it depends on the configuration!
 3.34.00 2002.1119mu
     1.) Added a Soft Front Panel for the SM6004
     2.) Added a Soft Front Panel for the SM6005
 3.33.00 2002.1024mu
     1.) Fixed a problem in SFP startup code for the 11197 special. Was causing an incorrect
             display of the relay states.
 3.32.00 2002.1011mu
     1.) ECR 0190: Changed labels on soft panels for the SM7012L and the SM7000-S-11197 so
             they match the silkscreen on the hardware.
     2.) Added support for the SMP6000-S-11227 and SM7000-S-11201.
     3.) Removed some unused code left over from 11106 development.
 3.31.00 2002.1011mu
     1.) Removed redundant semicolons in vtvmSmip.h. Thanks to TGE!
 3.30.00 2002.0826mu
     1.) In vtvmSmip_GetNvMin() and vtvmSmip_GetModelInfo(), moved initialization of the
             *populated output parameter to before the call to vtChkFunc(). This ensures that if
             vtChkFunc() fails, the output is in the correct state. Thanks to LMCO Orlando!
     2.) Added support for the SM7012L 20GHz Latching Microwave Switch Module
     3.) Added support for the SM7000-S-11197 Custom Latching Microwave Switch Module
     4.) Changed _qryLoadStatus() so that if the status is read once, vt7600_LdStatus is set
             to 'stale'. If an attempt is made to read the status when it is 'stale', the register
             will be read instead of the stored value.
     5.) _disableLoad() will now allow disable load regardless of status.
 3.29.00 2002.0826mu
     1.) ECR0127, Fixed definition of model number for SM6102 in vtvmSmip.bas, was 6101,
                 now 6102
     2.) Added support for SMP2007, SMP2008 and SMP2009
 3.28.00 2002.0708mu
     1.) Added the SMP2011, SM1100-S-11177-1 and SM1100-S-11177-2.
             These SMODs have a new FPGA with 'RESET ALL' implemented in the control register.
     2.) Changed _RstAllLatch() so it leaves the new reset bit low.
     3.) Changed call to vtChkFunc() in _self_test() so it doesn't fail on unpopulated SMOD.
 3.27.00 2002.0604mu
     1.) Added a call to _QryMwLatch() in _SetMwLatch(). If the relay module is already in
             the commanded position, the contacts are not toggled.
 3.26.00 2002.0530mu
     1.) Fixed bugs in _QryMwLatch() and _SetMwLatch() for release with production boards.
     2.) Added _RstMwLatch() to reset the MW Latches
     3.) Fixed a bug in _GetMicrowaveType() so Smod 1 works on the SM7001L
     4.) Fixed initPnl7001L() so it doesn't query 'K7' or the Reset line on MW latches.
     5.) Fixed _QryMwLatch() so it returns an error if 'K7' or the Reset line is queried.
     6.) Added field spr_flags to the NonVol Data structure to cope with VB alignment
 3.25.00 2002.0510mu (Thanks to JB)
     1.) Fixed GetExtendedInfo() so it identifies SM1000Bs correctly.
     2.) In _error_message(), added output messages for common warning status values
 3.24.00 2002.0430mu (Thanks to JB)
             Fixed _CloseMwRelay() so it works with 'Pass Thru' modules.
 3.23.02 2002.0425mu (Thanks to WJH)
     1.) WJH Modified StartUp code to allow read nonVol if not GPIB Bus.
 3.23.01 2002.0424mu (Thanks to WJH)
     1.) WJH Added data type casting A/R to eliminate warnings when compiling in MS VC++.
     2.) WJH Fixed _IdQuery() so it sets the length even if it doesn't read nonVol.
 3.23.00 2002.0418mu
     1.) Modified _CloseMwRelayList() to call _CloseMwRelay() for each relay in the list.
                 Was calling _closeRelayList() which does not enforce 'one coil at a time' rules.
     2.) Modified _OpenMwRelayList() to call _OpenMwRelay() for each relay in the list.
                 Was calling _openRelayList() which does not enforce 'one coil at a time' rules.
     3.) Added support for the SM7374L Latching Microwave Relay with readback.
 3.22.00 2002.0405mu
     1.) Modified _querySmip() so it doesn't clear the 'Modules used in trace' bits.
     2.) Modified _setRelayGroup() to use viOut16 instead of viMove because of a bug
                 in a recent version of NI-VISA.
 3.21.00 2002.0322mu
     1.) Finished the entries for the SMP7500 & SMP7600 in the function panel.
     2.) Cleaned up the function panel and added info for many controls.
     3.) Fixed multiple instances of mapBase being set incorrectly. For the optical switches,
                 this wasn't a problem because they have only had SMOD=0 so far.
 3.20.00 2002.0311mu
     1.) Added full support for the SMP7500
 3.19.01 2002.0211mu
     1.) Fixed GetFpReset() in the Help File.
     2.) Updated the driver revision.
 3.19.00 2002.0211mu
     1.) Fixed GetFpReset() in the Function Panel and the Help File
     2.) Added constant definitions to vtvmSmip.bas. Had been left out of build.
 3.18.04 2002.0131mu
     1.) Added _queryRFMuxPath(), _closeRFMuxPath() and _openRFMuxPath() to support the
                 SMP6101-S-11184 Special 1X31 Mux.
 3.18.03 2002.0129mu
     1.) Modified SMP7600 functions as required to ensure that the fault status bits
                 are read before attempting to write to the switch module. If any fault
                 condition is discovered, the status is returned and no attempt is made to
                 write to the module.
 3.18.02 2002.0122mu
     1.) Added SMP7600 Programmable Load
 3.18.01 2001.1203mu
     1.) Changed 'length' element in calls to _setRelayGroup() and VISA library
             function viMove(). The parameter was being declared as a ViInt16 and
             should have been ViBusSize.
 3.17.00 2001.1128mu
     1.) Added SMP6301 RF Multiplexer
 3.16.03 2001.1105mu
     1.) Added SM6203, SM6204 and SM7500
 3.16.02 2001.1010mu
     1.) Mods to fix SPDT (MW Module Type 2). Was enforcing 'one coil on at a time'
             which is inappropriate for this module.
 3.16.01 2001.0926mu
     1.) More mods to speed up the GPIB Startup.
 3.15.01 2001.0924mu
     1.) Added code for the SM2004-11118 Special.
     2.) Added code for the SMP2104.
 3.14.02 2001.0914mu
     1.) Fixed another bug relating to even numbered microwave modules. See notes for
     Rev 3.11 below. Fixed it so it accepts Module/Channel style calls.
 3.14.01 2001.0907mu
     1.) Preliminary fix for slow GPIB Startup
 3.13.01 2001.0806mu
     1.) Added constants for the SM5002-11120.
 3.12    2001.0607mu
     1.) Added constants for the SM6101 and SM6201.
 3.11    2001.0507mu
     1.) Fixed a bug causing the function not to work with even numbered microwave modules.
     The mwRelay argument must be in the range 1 to 8, BUT, for even numbered microwave
     modules, the relay number is actually in the range 9 to 16.
 3.10    2001.0424mu
     1.) Fixed an error in the build process that was causing the distribution kit to
                 be built using an invalid script.
     2.) Replaced all references to stored instrument handles and made all functions use
                 the handle passed from the caller. This was causing a problem in LabView.
 3.09    2001.0412mu
     1.) Fixed numerous functions that would exit on warnings, as opposed to errors. This
                 is so we comply with VXI Plug & Play Compatible Specs.
 3.08    2001.0406mu
     1.) Fixed the SM8101/SM8102 Optical Attenuators in the GUI, panel handles were not
                 being handled correctly due to a change in the loading order. Also added code
                 to check the busy bit before sending a command.
     2.) Cleaned up unused code leftover from 11106 development.
     3.) Renamed mw_spdt... bitmap files to correct NO/NC reversal.
     4.) Fixed vtvmSmip_SetRelayGroup() so it works with an input offset of zero.
                 Also fixed vtvmSmip_GetRelayGroup() which had the same problem.
                 Also created a function panel for vtvmSmip_GetRelayGroup() and moved the
                 prototype for it to vtvmSmip.h so it will be globally visible.
 3.07    2001.0207mu Added the SM7001A-S-11106
         2001.0220sgr    Changed all data types to VISA types. Changed the SetRelayGroup()
             function to a viMove. Added defined constants to the BAS file.
 3.06    2001.0105mu
     1.) Added the SM7002 'Non-Terminated Microwave Multiplexer'
     2.) Revised the Microwave Multiplexer driver functions to prevent having more than
             one coil energized at a time. This should eliminate the possibility of over-
             heating the relay or overloading the chassis power supply.
 3.05    2000.1208mu
     1.) Fixed the problem of the missing "def_smip.h" file. Renamed the file to
             "vtSmipDefs.h" to comply with VPP-3.2 Rule 4.2/Permission 4.1.
     2.) Revised switches on INIT Panel (Sfp_Smip.uir) to return the correct values.
 3.04    2000.1206mu
     1.) Added a function panel and function vtvmSmip_QueryBoardBusy().
 3.03    2000.1121mu
     1.) Upgraded the SM3001 Scan Setup function with new code provided by Tom Sarfi.
             Tom's code was modified to comply with the PnP Specs. The function is now called
             vtvmSmip_SetupScan3001(). Added a function panel for vtvmSmip_SetupScan3001().
     2.) Added function panels for vtvmSmip_openMatrixPath() and vtvmSmip_closeMatrixPath().
     3.) Added a function panel and function vtvmSmip_queryMatrixPath().
 3.02    2000.1108mu
     1.) Added SM7100 Microwave Multiplexer.
     2.) Fixed a number of pointer sign mismatches in parameter lists.
 3.01    22 Sep, 2000
     1.) Changed the parameter DRIVER_REVISION to vtvmSmip_DRIVER_REVISION to prevent
         future conflicts if another driver revision parameter is similarly misnamed.
     2.) Added the function vtvmSmip_XXXX to test.  This function sets up arrays
         for the SM3001 to use in the Scan function.
     3.) Removed the error codes vtvmSmip_MISSING_PARAMETER and vtvmSmip_ILLEGAL_PARAMETER.
         These error codes are not used in this driver.
 3.0 30 Jun, 2000
     1.) Changed the following parameters in named functions to comply with VPP34 section 3.5.
         Also changed the notes in the comment sections to comply with the actual function.
         These changes affect the .H, the .C, and the .FP files, and all supporting
         documentation. These changes will also affect the .SFP files.
             a.) Changed the third parameter in GetMicrowaveType from a ViInt8 to a ViInt16
             b.) Changed the ScanChassis function panel. This FP had an extra parameter
                 left from the previous FP this one was made from.
 2.11  2000.0524mu
     1.) Added the SM6004 Multiplexer
     2.) Removed references to 'HARD_CPU_SPEED'.
     3.) Now calculates delay loop counts based on clock() rather than time().
     4.) Modified findCpuSpeed() to improve delay time resolution. Functions findCpuSpeed()
         and vtvmSmip_NvDelay() now use clock() instead of time() giving us 1mS clock
         resolution & apparently improved delay timing. For a requested delay of 5uS on a
         180MHz Pentium, was getting 100mS or greater delay per call. Now it's ~40uS. Based on
         observed waveforms, changed NV_DELAY from 5uS to 20uS to allow for settling.
         In addition, clkResolution was ~350uS or greater, now it's ~40uS! With old delay
         function, it took ~ 1Sec to read (minimum) 1 SMIP Card's nonvol.
         With new delay, it's about 150mS!!!
     5.) Modified vtvmSmip_NvDelay() to get closer to actual times required.
     6.) Moved all NonVol related calls to ViIn16() and vtvmSmip_NvDelay() into function
         rdNonVol(). This eliminated having to put a delay call after every call to ViIn16().
     7.) Moved all NonVol related calls to ViOut16() and vtvmSmip_NvDelay() into function
         wrNonVol(). This eliminated having to put a delay call after every call to ViOut16().
     8.) Added the SM6005 Multiplexer
     9.) Changed vtvmSmip_revision_query to comply with VPP32 section 3.7.
     10.)    Cosmetic cleanup to improve readability
 2.10    6 May, 2000
     1.) Added FP, Help, and DOC information for Optical Functions.
 2.9  3/27/00    1. Changed "if(n % 2)" to "if(board % 2)" in loadScanSetup and readScanSetup.
 2.8  1/26/00    1. Optical switches have been added.
 2.7  12/7/99    1. SM5003 panel added.
 2.6  11/24/99
     1. HARD_CPU_SPEED issues resolved. "Timer" function changed to "time" function.
         Non-vol writes now work with this revision of the driver.
 2.5 7/1/99
     1. Moved the readNv variable into the SmipInfo structure. Added readNv_ID, readNv_Ext,
         and readNv_User to SmipInfo.
     2. Moved the global variable VxiAddress to the SmipInfo structure.
     3. Modified the CloseRelayList and OpenRelayList functions to check for completion of a
         write operation before performing the next read operation.
     4. Changed the clk and dataImg variables to LA dependent arrays.
     5. Changed GetModelInfo() which was returning an error if the board queried wasn't
         populated. This made no sense as the function was asking if it was populated. Now the
         function just returns the status of the queried board.
     6. Moved several unused variables to the non-compiled sections where they would be used
         to prevent compiler warnings.
 2.4 5/26/99
     1. Microwave operate value should be 15ms not 5ms (i.e. relay switching time)
     2. Selftest was using a non-stack variable called ST_smipInfo which is 1.5K. Turns out
         someone out there is spinning off multiple processes, each one calling this function,
         which is not reentrant because of this variable. I thought 1.5 was a bit big for the
         stack. But it appears CVI defaults to MINIMUM 10K (won't allow you to go lower). Plus
         it's the caller's stack, they can make theirs bigger if they need.
 2.3 5/26/99  1. All panels besides the 700x series were missing relay canvas's
 2.2 5/25/99
     1. HARD_CPU_SPEED instead of calculated. HPVEE didn't like calling a CVI function.
     2. Include of CVI .h files fiasco (Tom Sarfi coordinated effort)
     3. Included spstBSq_ bit maps in the distribution. SM2004 did not show relays closing.
     4. 7000 & 70001 (Microwave Relays)
             vtvmSmip_GetMicrowaveType();
             vtvmSmip_OpenMwRelay();             vtvmSmip_CloseMwRelay();
             vtvmSmip_OpenMwRelayList();     vtvmSmip_CloseMwRelayList();
             vtvmSmip_QueryRelay();              vtvmSmip_QueryMwRelay();
     5. Add a P&P function that allows them to read back a relay
 2.1 1/7/99
     1. Fixed bug in reduced_nonvol_query(). For the generic board it was reporting incorrect
         max_relays and delay.
     2. Added GUI support for 2004, 2005
     3. Eliminated the instr handle check in error_message()
     4. In error_message() return VI_WARN_UNKNOWN_STATUS if the function fails.
     5. Changed definition in function tree (.fp) file for parameters defined as
         ViPInt16 to ViInt16 ... [].
     6. Changed the 2nd parameter in vtvmSmip_init() to idQuery instead of idFlag.
         Apparently HP-VEE failed on this discrepency
 2.0
     1. changed #defines for reset and id_query flags to the init and reset P&P driver
         functions from 100x  BS to 0 and 1 since these are defined as booleans. HP was
         choking on the fact that they were prototyped as boolean but were passing non-
         boolean type values.
     2. Ashcanned some useless defines held over from the 3616 driver.
 1.9
     1. Corrected the 6002 SFP
     2. Moved proprietary defines from vtvmsmip.h to vtvmsmip.c so they will not conflict
         with other driver include defines.
     3. Fixed the Reset() .fp. It was missing the board parameter
     4. Discovered that NV writes do not work with the .exe. This is because NI clock() lib
         function is erratic.
     5. Issue arose with writing user non-vol. It does not update the checksum because it
         never ever reads it. Now we do not issue a checksum error.
     6. Discovered techique of re-prototyping the non-vol routines for VB so a UDT can be
         used in VB.
 1.8 1. Original documented release. */ */
